package dev.tools.view.dialogs;

import javax.swing.*;
import java.awt.*;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: Nuno
 * Date: 03-10-2013
 * Time: 18:46
 */
public class ListDialog extends Dialog {
    private final JList<Object> list;

    protected ListDialog(JFrame frame) {
        super(frame, new BorderLayout());

        list = new JList<>();
        getContentsPanel().add(list, BorderLayout.CENTER);
    }

    public void setStrings(List<String> strings){
        list.setListData(strings.toArray());
    }
}
